﻿using System;
using System.Collections.Generic;
using System.Text;
using Slf.Factories;

namespace Slf.Samples.NamedLoggers
{
  public class BlueConsoleLogger : ConsoleLogger
  {
    public BlueConsoleLogger(string name) : base(name)
    {
    }

    public override void Log(LogItem item)
    {
      Console.ForegroundColor = ConsoleColor.Blue;
      base.Log(item);
      Console.ResetColor();
    }
  }


  public class BlueConsoleFactory : NamedLoggerFactoryBase<BlueConsoleLogger>
  {
    protected override BlueConsoleLogger CreateLogger(string name)
    {
      return new BlueConsoleLogger(name);
    }
  }
}
